%li{ class: mr_css_classes(merge_request) }
  .merge-request-title
    %span.merge-request-title-text
      = link_to_gfm merge_request.title, merge_request_path(merge_request), class: "row_title"
    .merge-request-labels
      - merge_request.labels.each do |label|
        = link_to_label(label, project: merge_request.project)
    .pull-right.light
      - if merge_request.merged?
        %span
          %i.fa.fa-check
          MERGED
      - elsif merge_request.closed?
        %span
          %i.fa.fa-ban
          CLOSED
      - else
        %span.hidden-xs.hidden-sm
          %span.label-branch<
            %i.fa.fa-code-fork
            %span= merge_request.target_branch
      - note_count = merge_request.mr_and_commit_notes.user.count
      - if merge_request.assignee
        &nbsp;
        = link_to_member(merge_request.source_project, merge_request.assignee, name: false)
      - if note_count > 0
        &nbsp;
        %span
          %i.fa.fa-comments
          = note_count
      - else
        &nbsp;
        %span.merge-request-no-comments
          %i.fa.fa-comments
          = 0

  .merge-request-info
    = "##{merge_request.iid} opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')} by #{link_to_member(@project, merge_request.author, avatar: false)}".html_safe
    - if merge_request.votes_count > 0
      = render 'votes/votes_inline', votable: merge_request
    - if merge_request.milestone_id?
      &nbsp;
      %span
        %i.fa.fa-clock-o
        = merge_request.milestone.title
    - if merge_request.tasks?
      %span.task-status
        = merge_request.task_status

    .pull-right.hidden-xs
      %small updated #{time_ago_with_tooltip(merge_request.updated_at, placement: 'bottom', html_class: 'merge_request_updated_ago')}
